// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.*;
import com.fowo.api.sys.entity.SysFile;
import com.fowo.api.sys.rd2.annotation.RoleData2;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * PurchasePlans
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "purchase_plans", autoResultMap = true)
@Schema(title = "采购计划")
@RoleData2(groupId = 2, funcKey = "PurchasePlans")
public class PurchasePlans implements Serializable {

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 创建批次号
   */
  @TableField(value = "`ppg_sn`")
  @Schema(title = "创建批次号")
  private String ppgSn;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 计划采购量
   */
  @TableField(value = "`quantity_plan`")
  @Schema(title = "计划采购量")
  private String quantityPlan;

  /**
   * 批次备注
   */
  @TableField(value = "`remark`")
  @Schema(title = "批次备注")
  private String remark;

  /**
   * 全部国家
   */
  @TableField(value = "`country`")
  @JoinField(SysRegion.class)
  @Schema(title = "全部国家")
  private Long country;

  /**
   * 全部店铺
   */
  @TableField(value = "`shop`")
  @JoinField(ShopInfo.class)
  @Schema(title = "全部店铺")
  private Long shop;

  /**
   * 供应商
   */
  @TableField(value = "`supply`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supply;

  /**
   * 加急
   */
  @TableField(value = "`urgent`")
  @Schema(title = "加急")
  private String urgent;

  /**
   * 关联加工计划
   */
  @TableField(value = "`man_plan`")
  @Schema(title = "关联加工计划")
  private String manPlan;

  /**
   * 产品类型
   */
  @TableField(value = "`pro_type`")
  @Schema(title = "产品类型")
  private String proType;

  /**
   * 附件
   */
  @TableField(value = "`file`", typeHandler = SysFileListTypeHandler.class)
  @Schema(title = "附件")
  private List<SysFile> file;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 状态 (2 - 待采购; 3 - 已完成; 4 - 已驳回; 5 - 已作废; 1 - 待审批; 0 - 待提交; )
   */
  @TableField(value = "`status`")
  @Schema(title = "状态")
  private String status;

  /**
   * 已采购数量
   */
  @TableField(value = "`quantity_purchased`")
  @Schema(title = "已采购数量")
  private Long quantityPurchased;

  /**
   * 创建人
   */
  @TableField(value = "`create_name`")
  @JoinField(SysUser.class)
  @Schema(title = "创建人")
  private Long createName;

  /**
   * 创建人
   */
  @TableField(value = "`create_name2`")
  @Schema(title = "创建人")
  private String createName2;

  /**
   * 采购仓库
   */
  @TableField(value = "`purchase_ware`")
  @JoinField(PurchaseOrder.class)
  @Schema(title = "采购仓库")
  private Long purchaseWare;
}
